package com.kyh.entity;

import javax.persistence.Table;


import java.util.Date;

import com.kyh.annotation.Model;
import com.kyh.entity.base.BaseEntity;

/**
*/
@Table(name="templet")
public class Templet extends BaseEntity<Templet> {

	@Model(nameTable="id")
	private Long id; // 主键ID
	@Model(nameTable="name")
	private String name; // 模板名称
	@Model(nameTable="type")
	private Integer type; // 模板类型，1文章模板2栏目模板3专题模板
	@Model(nameTable="code")
	private String code; // 模板代码
	@Model(nameTable="status")
	private Integer status; // 
	@Model(nameTable="createTime",type=Model.TYPE.DATE, format="yyyy-MM-dd HH:mm:ss")
	private Date createTime; // 
	@Model(nameTable="updateTime",type=Model.TYPE.DATE, format="yyyy-MM-dd HH:mm:ss")
	private Date updateTime; // 

	public Long getId() {
		return id;
	}
	public Templet setId(Long id) {
		this.id = id;
		return this;
	}
	public String getName() {
		return name;
	}
	public Templet setName(String name) {
		this.name = name;
		return this;
	}
	public Integer getType() {
		return type;
	}
	public Templet setType(Integer type) {
		this.type = type;
		return this;
	}
	public String getCode() {
		return code;
	}
	public Templet setCode(String code) {
		this.code = code;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public Templet setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public Templet setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public Templet setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static Templet templet(
			String name,
			Integer type,
			String code,
			Integer status
			) {
		Templet entity = new Templet();
		entity.setName(name);
		entity.setType(type);
		entity.setCode(code);
		entity.setStatus(status);
		return entity;
	}
}